<?php
session_start();
$userid=null;
if (isset($_SESSION["userid"])==false || $_SESSION["userid"]==null) {
	header("Location: index.php");
	exit;
} else {
	$userid = $_SESSION["userid"];
}
require("dbinit.php");

$typeID = $_POST["typeID"];
$query = "SELECT ucMaintour.indexTour, ucMaintour.colTourname from ucMaintour, ucTourcourses where ucMaintour.indexTour = ucTourcourses.indexTour and ucMaintour.colEmail='" . $userid . "' and ucTourcourses.colCategory='" . $typeID . "'";
$result = mysql_query($query, $link);
while ($row = mysql_fetch_assoc($result)) {	
	echo "<li class='menu_item " . $typeID . "' id='item_" . $row["indexTour"] . "' onclick='btn_editTour_click(\"" . $row["indexTour"] . "\")'><a>" . $row["colTourname"] . "</a></li>";
 
}


